package com.huawei.appmarket.service.alarm.control;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.huawei.hwid.core.constants.HwAccountConstants;

public class PowerConnectedBackgroundTaskReceiver extends BroadcastReceiver {
    private static PendingIntent ॱ(Context context) {
        Intent intent = new Intent(context.getApplicationContext(), PowerConnectedBackgroundTaskReceiver.class);
        intent.addFlags(16777216);
        intent.addFlags(268435456);
        return PendingIntent.getBroadcast(context.getApplicationContext(), 20190824, intent, HwAccountConstants.FLAG_TRANS_NAVIGATION_BAR);
    }

    public static void cancelAlarm(Context context) {
        ((AlarmManager) context.getSystemService("alarm")).cancel(ॱ(context));
    }

    public void onReceive(Context context, Intent intent) {
        cancelAlarm(context);
    }
}
